Circuits and methods for generating a self-test of a magnetic field sensor

ABSTRACT

A magnetic field sensor includes built in self-test circuits that allow a self-test of most of, or all of, the circuitry of the magnetic field sensor, including self-test of a magnetic field sensing element used within the magnetic field sensor, while the magnetic field sensor is functioning in normal operation.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a Continuation Application of U.S. patentapplication Ser. No. 13/743,451, filed Jan. 17, 2013, now U.S. Pat. No.8,818,749, issued Aug. 26, 2014, which application is a ContinuationApplication of U.S. patent application Ser. No. 12/706,318, filed Feb.16, 2010, now U.S. Pat. No. 8,447,556, issued May 21, 2013, whichapplication claims the benefit under 35 U.S.C. §119(e) of U.S.Provisional Application No. 61/153,059 filed Feb. 17, 2009, whichapplications are incorporated herein by reference in their entirety.

STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH

Not Applicable.

FIELD OF THE INVENTION

This invention relates generally to magnetic field sensors and, moreparticularly, to a magnetic field sensors having a self-test capability.

BACKGROUND OF THE INVENTION

As is known, there are a variety of types of magnetic field sensingelements, including, but not limited to, Hall effect elements,magnetoresistance elements, and magnetotransistors. As is also known,there are different types of Hall effect elements, for example, a planarHall element, a vertical Hall element, and a circular Hall element. Asis also known, there are different types of magnetoresistance elements,for example, a giant magnetoresistance (GMR) element, an anisotropicmagnetoresistance element (AMR), a tunneling magnetoresistance (TMR)element, and a magnetic tunnel junction (MTJ).

Hall effect elements generate an output voltage proportional to amagnetic field. In contrast, magnetoresistance elements changeresistance in proportion to a magnetic field. In a circuit, anelectrical current can be directed through the magnetoresistanceelement, thereby generating a voltage output signal proportional to themagnetic field.

Magnetic field sensors, i.e., circuits that use magnetic field sensingelements, are used in a variety of applications, including, but notlimited to, a current sensor that senses a magnetic field generated by acurrent carried by a current-carrying conductor, a magnetic switch thatsenses the proximity of a ferromagnetic object, a rotation detector thatsenses passing ferromagnetic articles, for example magnetic domains of aring magnet, and a magnetic field sensor that senses a magnetic fielddensity of a magnetic field.

As is known, some integrated circuits have internal built-in self-test(BIST) capabilities. A built-in self-test is a function that can verifyall or a portion of the internal functionality of an integrated circuit.Some types of integrated circuits have built-in self-test circuits builtdirectly onto the integrated circuit die. Typically, the built-inself-test is activated by external means, for example, a signalcommunicated from outside the integrated circuit to dedicated pins orports on the integrated circuit. For example, an integrated circuit thathas a memory portion can include a built-in self-test circuit, which canbe activated by a self-test signal communicated from outside theintegrated circuit. The built-in self-test circuit can test the memoryportion of the integrated circuit in response to the self-test signal.

Conventional built-in self-test circuits tend not to allow theintegrated circuit to perform its intended function while the built-inself-test is being performed. Instead, during the built-in self-test,the built-in self-test circuit exercises all of, or parts of, circuitson the integrated circuit in particular ways that do not necessarilyallow concurrent operation of functions that the integrated circuit isintended to perform. Therefore, the built-in self-test is typically onlyactivated one time, for example, upon power up of the integratedcircuit, or from time to time. At other times, the built-in self-testcircuit and function are dormant and the integrated circuit can performits intended function.

Furthermore, when used in magnetic field sensors, conventional built-inself-test circuits tend not to test the magnetic field sensing elementused in the magnetic field sensor.

It would be desireable to provide built in self-test circuits andtechniques in a magnetic field sensor that allow the self-test to be runfrom time to time or upon command while the magnetic field sensorconcurrently performs its intended function. It would also be desirableto provide such a concurrent self-test that tests a magnetic fieldsensing element used within the magnetic field sensor.

SUMMARY OF THE INVENTION

The present invention provides self-test circuits and techniques in amagnetic field sensor that allow the self-test to be run from time totime or upon command while the magnetic field sensor concurrentlyperforms its intended function. The present invention also provides sucha concurrent self-test that tests a magnetic field sensing element usedwithin the magnetic field sensor.

In accordance with one aspect of the present invention, a magnetic fieldsensor includes a magnetic field sensing element supported by asubstrate. The magnetic field sensing element is for generating acomposite magnetic field signal having ameasured-magnetic-field-responsive signal portion and aself-test-responsive signal portion. Themeasured-magnetic-field-responsive signal portion is responsive to ameasured magnetic field. The self-test-responsive signal portion isresponsive to a self-test magnetic field. The magnetic field sensor alsoincludes a self-test circuit having a self-test current conductorproximate to the magnetic field sensing element. The self-test currentconductor is for carrying a self-test current to generate the self-testmagnetic field. The magnetic field sensor also includes a processingcircuit coupled to receive a signal representative of the compositemagnetic field signal. The processing circuit is configured to generatea sensor signal representative of the measured-magnetic-field-responsivesignal portion. The processing circuit is also configured to generate atleast one of a diagnostic signal representative of theself-test-responsive signal portion or a composite signal representativeof both the measured-magnetic-field-responsive signal portion and theself-test-responsive signal portion.

In accordance with another aspect of the present invention, a method ofgenerating a self-test of a magnetic field sensor includes generating,with a magnetic field sensing element, a composite magnetic field signalcomprising a measured-magnetic-field-responsive signal portion and aself-test-responsive signal portion. Themeasured-magnetic-field-responsive signal portion is responsive to ameasured magnetic field. The self-test-responsive signal portion isresponsive to a self-test magnetic field. The method also includesgenerating a self-test current in a self-test current conductorproximate to the magnetic field sensing element. The self-test currentconductor is for carrying the self-test current to generate theself-test magnetic field. The method also includes generating a sensoroutput signal representative of the measured-magnetic-field-responsivesignal portion. The method also includes generating at least one of adiagnostic signal representative of the self-test-responsive signalportion or a composite signal representative of both themeasured-magnetic-field-responsive signal portion and theself-test-responsive signal portion.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing features of the invention, as well as the invention itselfmay be more fully understood from the following detailed description ofthe drawings, in which:

FIG. 1 is block diagram showing a magnetic field sensor in accordancewith the present invention, having a magnetic field sensing element, aself-test conductor, a diagnostic request processor, a signal processor,and output circuits;

FIG. 2 is a block diagram showing one exemplary arrangement of themagnetic field sensing element and the self-test conductor of FIG. 1;

FIG. 2A is a block diagram showing another exemplary arrangement of themagnetic field sensing element and the self-test conductor of FIG. 1;

FIG. 2B is a block diagram showing yet another exemplary arrangement ofthe magnetic field sensing element and the self-test conductor of FIG.1;

FIG. 2C is a block diagram showing yet another exemplary arrangement ofthe magnetic field sensing element and the self-test conductor of FIG.1;

FIG. 2D is a block diagram showing yet another exemplary arrangement ofthe magnetic field sensing element, here shown as four magnetic fieldsensing elements, and the self-test conductor of FIG. 1;

FIG. 3 is block diagram showing a cross section representative of oneexemplary arrangement of the magnetic field sensing element and theself-test conductor of FIG. 1, namely, the magnetic field sensingelement and the self-test conductor of FIG. 2B, wherein the arrangementincludes an electromagnetic shield;

FIG. 3A is block diagram showing a cross section representative ofanother exemplary arrangement of the magnetic field sensing element andthe self-test conductor of FIG. 1, wherein the arrangement includes anelectromagnetic shield;

FIG. 3B is block diagram showing a cross section representative of yetanother exemplary arrangement of the magnetic field sensing element andthe self-test conductor of FIG. 1;

FIG. 3C is block diagram showing a cross section representative of yetanother exemplary arrangement of the magnetic field sensing element andthe self-test conductor of FIG. 1, namely, the magnetic field sensingelement and the self-test conductor of FIG. 2C, wherein the arrangementincludes an electromagnetic shield;

FIG. 3D is block diagram showing a cross section representative of yetanother exemplary arrangement of the magnetic field sensing element andthe self-test conductor of FIG. 1, wherein the arrangement includes anelectromagnetic shield;

FIGS. 3E-3G are block diagrams showing three arrangements for magneticfield sensors;

FIG. 4 is a block diagram showing further details of the diagnosticrequest processor of FIG. 1;

FIG. 5 is a block diagram of an exemplary magnetic field sensor showingfurther details of the magnetic field sensing element, the self-testconductor, and the signal processor of FIG. 1;

FIG. 5A is a block diagram of another exemplary magnetic field sensorshowing further details of the magnetic field sensing element, theself-test conductor, and the signal processor of FIG. 1;

FIG. 5B is a block diagram showing common drain output circuits that canbe used as part of the magnetic field sensors of FIGS. 5 and 5A;

FIG. 6 is a block diagram of another exemplary magnetic field sensorshowing further details of the magnetic field sensing element, theself-test conductor, and the signal processor of FIG. 1;

FIG. 7 is a graph showing exemplary output signals from the magneticfield sensors of FIGS. 1, 5, 5A, and 6;

FIG. 7A is a graph showing another exemplary output signal from themagnetic field sensors of FIGS. 1, 5, 5A, and 6;

FIGS. 7B-7F are graphs showing different exemplary diagnostic inputsignals received by the diagnostic request processor of the magneticfield sensors of FIGS. 1, 5, 5A, and 6;

FIG. 8 is a graph showing a diagnostic input signal, the same as orsimilar to the diagnostic input signal of FIG. 7B, received by thediagnostic request processor of the magnetic field sensors of FIGS. 1,5, 5A, and 6;

FIGS. 8A-8D are graphs showing different exemplary diagnostic outputsignals generated by the magnetic field sensors of FIGS. 1, 5, 5A, and6;

FIG. 9 is a graph showing exemplary output signals, the same as orsimilar to the output signals shown in FIG. 7, from the magnetic fieldsensors of FIGS. 1, 5, 5A, and 6;

FIG. 9A is a graph showing a diagnostic input signal, the same as orsimilar to the diagnostic input signal of FIGS. 7B and 8, received bythe diagnostic request processor of the magnetic field sensors of FIGS.1, 5, 5A, and 6;

FIGS. 9B-9E are graphs showing different exemplary combined outputsignals generated by the magnetic field sensors of FIGS. 1, 5, 5A, and6;

FIGS. 10-10B are a series of graph showing a diagnostic control signal,a diagnostic output signal generated by the magnetic field sensors ofFIGS. 5 and 6, and a diagnostic output signal generated by the magneticfield sensor of FIG. 5A;

FIG. 11 is a top view of an exemplary electromagnetic shield that canform part of the magnetic field sensor of FIG. 1, and which can be usedas the electromagnetic shield of FIGS. 3, 3A, 3C, and 3D;

FIG. 12 is a top view of another exemplary electromagnetic shield thatcan form part of the magnetic field sensor of FIG. 1, and which can beused as the electromagnetic shield of FIGS. 3, 3A, 3C, and 3D;

FIG. 13 is a top view of yet another exemplary electromagnetic shieldthat can form part of the magnetic field sensor of FIG. 1, and which canbe used as the electromagnetic shield of FIGS. 3, 3A, 3C, and 3D;

FIG. 14 is a top view of yet another exemplary electromagnetic shieldthat can form part of the magnetic field sensor of FIG. 1, and which canbe used as the electromagnetic shield of FIGS. 3, 3A, 3C, and 3D;

FIG. 15 is a block diagram showing a plurality of magnetic field sensorsused to sense a position of a gear shift lever as may be provided in anautomobile; and

FIG. 16 is a block diagram of a circuit having a self-test conductor,through which a direction of a drive current can be changed.

DETAILED DESCRIPTION OF THE INVENTION

Before describing the present invention, some introductory concepts andterminology are explained. As used herein, the term “magnetic fieldsensing element” is used to describe a variety of electronic elementsthat can sense a magnetic field. The magnetic field sensing elements canbe, but are not limited to, Hall effect elements, magnetoresistanceelements, or magnetotransistors. As is known, there are different typesof Hall effect elements, for example, a planar Hall element, a verticalHall element, and a circular Hall element. As is also known, there aredifferent types of magnetoresistance elements, for example, a giantmagnetoresistance (GMR) element, an anisotropic magnetoresistanceelement (AMR), a tunneling magnetoresistance (TMR) element, an Indiumantimonide (InSb) sensor, and a magnetic tunnel junction (MTJ).

As is known, some of the above-described magnetic field sensing elementstend to have an axis of maximum sensitivity parallel to a substrate thatsupports the magnetic field sensing element, and others of theabove-described magnetic field sensing elements tend to have an axis ofmaximum sensitivity perpendicular to a substrate that supports themagnetic field sensing element. In particular, most types ofmagnetoresistance elements tend to have axes of maximum sensitivityparallel to the substrate and most types of Hall elements tend to haveaxes of sensitivity perpendicular to a substrate.

As used herein, the term “magnetic field sensor” is used to describe acircuit that includes a magnetic field sensing element. Magnetic fieldsensors are used in a variety of applications, including, but notlimited to, a current sensor that senses a magnetic field generated by acurrent carried by a current-carrying conductor, a magnetic switch thatsenses the proximity of a ferromagnetic object, a rotation detector thatsenses passing ferromagnetic articles, for example, magnetic domains ofa ring magnet, and a magnetic field sensor that senses a magnetic fielddensity of a magnetic field.

Referring to FIG. 1, a magnetic field sensor 10 includes a magneticfield sensing element 32 supported by a substrate (not shown). Themagnetic field sensing element 32 is for generating a composite magneticfield signal 32 a having a measured-magnetic-field-responsive signalportion and a self-test-responsive signal portion. Themeasured-magnetic-field-responsive signal portion is responsive to ameasured magnetic field. The self-test-responsive signal portion isresponsive to a self-test magnetic field. The magnetic field sensor 10also includes a self-test circuit having a self-test current conductor30 proximate to the magnetic field sensing element 32. The self-testcurrent conductor 30 is for carrying a self-test current 24 a togenerate the self-test magnetic field. The magnetic field sensor 10 alsoincludes a processing circuit 34 coupled to receive a signal, e.g., thesignal 32 a, representative of the composite magnetic field signal 32 a.The processing circuit 34 is configured to generate a sensor signal 36 arepresentative of the magnetic field-signal portion. The processingcircuit 34 is also configured to generate at least one of a diagnosticsignal 36 c representative of the self-test-responsive signal portion ora composite signal 36 b representative of both themeasured-magnetic-field-responsive signal portion and theself-test-responsive signal portion.

In some embodiments, the self-test magnetic field is within a range ofabout twenty to forty Gauss. However in other embodiments, the self-testmagnetic field can be smaller than twenty Gauss or greater than fortyGauss.

The magnetic field sensor 10 can include power and bias and drivercircuits 22. The power and bias and driver circuits 22 can include acircuit power and bias module 28 configured to provide various voltagesand currents to the rest of the circuitry within the magnetic fieldsensor 10. The power and bias and driver circuits 22 can also include asensor element driver module 26 (e.g., a current source) configured, forexample, to generate a current signal 26 a coupled to the magnetic fieldsensing element 32. The power and bias and driver circuits 22 can alsoinclude a coil driver module 24 (e.g., a current source) configured togenerate a current signal 24 a coupled to the self-test currentconductor 30. However, in other embodiments, an external coil drivermodule, apart from the integrated circuit 10 can be used.

The magnetic field sensor 10 can also include a diagnostic requestprocessor 58 coupled to receive a diagnostic input signal (Diag_In) 23.The diagnostic request processor 58 is described more fully below inconjunction with FIG. 4 and the diagnostic input signal 23 is describedmore fully below in conjunction with FIGS. 4 and 7B-7F. However, let issuffice here to say that, in some embodiments, the diagnostic inputsignal 23 can be decoded by the diagnostic request processor 58, and, inresponse to the diagnostic input signal 23, the diagnostic requestprocessor 58 can initiate a self-test of the magnetic field sensor 10.The diagnostic request processor 58 can generate a diagnostic controlsignal 58 a, and the coil driver module 24 can be coupled to receive thediagnostic control signal 58 a. In response to the diagnostic controlsignal 58 a, the coil driver circuit 24 can generate the current signal24 a.

The processing circuit 34 (also referred to herein as a signal processor34) can include a processing module 36 having either an analog signalprocessor 38, a digital signal processor 40, or any combination ofanalog and digital processors 38, 40 that perform any combination ofanalog and digital processing of the composite magnetic field signal 32a. The arrow shown between the analog signal processor 38 and thedigital signal processor 40 is used merely to indicate the combinationof analog and digital signal processing and various couplingstherebetween.

The signal processor 34 can also include a gain adjustment module 42, anoffset adjustment module 44, and a temperature adjustment module 46,each coupled to the processing module 36. The gain adjustment module 42is configured to contribute to a signal 48 received by the processingmodule 36, which signal 48 is configured to adjust or calibrate a gainof the processing module 36. The offset adjustment module 44 is alsoconfigured to contribute to the signal 48 received by the processingmodule 36, which signal 48 is also configured to adjust or calibrate aDC offset of the processing module 36. The temperature adjustment module46 is also configured to contribute to the signal 48 received by theprocessing module 36, which signal 48 is configured to adjust orcalibrate a gain and/or a DC offset of the processing module 36 overtemperature excursions. It will be understood that that gain, offset,and temperature are but some common parameters that arecompensated/adjusted, but that compensation/adjustment is not limited tothose parameters only.

The processing module 36 is configured to generate the sensor signal 36a representative of the above-describedmeasured-magnetic-field-responsive signal portion. The processing module36 is also configured to generate at least one of the diagnostic signal36 c representative of the above-described self-test-responsive signalportion or the composite signal 36 b representative of both themeasured-magnetic-field-responsive signal portion and theself-test-responsive signal portion.

In some embodiments, the magnetic field sensor 10 can also includeoutput circuits 50, for example, a sensor output formatting circuit 52,a diagnostic output formatting circuit 56, and a combining circuit 54.Operation of the sensor output formatting circuit 52, the diagnosticoutput formatting circuit 56, and the combining circuit 54 will befurther understood from discussion below in conjunction with FIGS. 8-8Dand 9-9E. Let it suffice here to say that the sensor output formattingcircuit 52 can reformat the signal 36 a representative of themeasured-magnetic-field-responsive signal portion to generate a sensoroutput signal 52 a (Sensor_Out). The diagnostic signal formattingcircuit 56 can reformat the signal 36 c representative of theself-test-responsive signal portion to generate a diagnostic outputsignal 56 a (Diag_Out). The combining circuit 54 can either reformat thesignal 36 b representative of both themeasured-magnetic-field-responsive signal portion and theself-test-responsive signal portion to generate a combined output signal54 a (Combined_Out), or it can use the signals 52 a, 56 a to accomplisha similar result.

The magnetic field sensor 10 can also provide an external coil drivesignal 16 and an external ground 20, which can be coupled to an externalconductor or coil 18. The coil 18 can be used in place of the self-testcurrent conductor 30 to generate the above-described self-test magneticfield.

In operation, the current signal 24 a can be a pulse signal, andtherefore, the self-test magnetic field can be a pulsed magnetic fieldgenerated by the self-test current conductor 30 or by the external coil18. The self-test magnetic field can physically combine with theabove-described measured magnetic field, which is a field associatedwith that which the magnetic field sensor 10 is intended to measure. Forexample, the magnetic field sensor 10 can be intended to measure amagnetic field associated with a ferromagnetic or magnetic object, whichgenerates the measured magnetic field. For another example, the magneticfield sensor 10 can be intended to measure a current flowing in aconductor (not shown), which generates the measured magnetic field.

In operation, the combination of the measured magnetic field and theself-test magnetic field is received by the magnetic field sensingelement 32. The self-test magnetic field can be initiated by way of thediagnostic input signal 23, described more fully below in conjunctionwith FIGS. 7-7F. The self-test magnetic field can also be initiated inother ways described more fully below in conjunction with FIG. 4. Themagnetic field sensing element thus generates the above describedcomposite magnetic field signal 32 a having ameasured-magnetic-field-responsive signal portion, which is responsiveto the measured magnetic field, and a self-test-responsive signalportion, which is responsive to the self-test magnetic field.

In some embodiments, the processing circuit 36 can operate to separatethe measured-magnetic-field-responsive signal portion from theself-test-responsive signal portion to generate the sensor signal 36 arepresentative of the magnetic field-signal portion and the diagnosticsignal 36 c representative of the self-test-responsive signal portion.However, in some embodiments, the processing circuit can generate thecomposite signal 36 b representative of both themeasured-magnetic-field-responsive signal portion and theself-test-responsive signal portion in addition to or in place of thesignal 36 c.

In operation the output circuits 50 can reformat the signals 36 a-36 cinto at least the formats described below in conjunction with FIGS.8A-8D, 9, 9B-9E, 10A, and 10B.

Referring now to FIG. 2, in which like elements of FIG. 1 are shownhaving like reference designations, a self-test current conductor 30′(where the prime symbol is indicative of one particular variation of theself-test current conductor 30 of FIG. 1) is proximate to the magneticfield sensing element 32. When a current in the direction of the arrowon the conductor 30′ passes through the self-test current conductor 30′,a self-test magnetic field 60 a is generated and is received by themagnetic field sensing element 32 as a magnetic field generallyperpendicular to a major surface of the magnetic field sensing element32. Thus, this arrangement is generally suitable for most types of Halleffect elements.

The self-test magnetic field 60 a can be a pulsed magnetic fieldgenerated by a pulsed current carried by the self-test current conductor30′. The self-test magnetic field 60 a physically adds to any othermagnetic field (not shown), e.g., the measured magnetic field,experienced by the magnetic field sensing element 32.

Referring now to FIG. 2A, in which like elements of FIGS. 1 and 2 areshown having like reference designations, a self-test current conductor30″ is proximate to the magnetic field sensing element 32. The self-testcurrent conductor 30″ forms a single-turn loop around the magnetic fieldsensing element 32. When a current in the direction of the arrows on theconductor 30″ passes through the self-test current conductor 30″, aself-test magnetic field 60 b is generated and is received by themagnetic field sensing element 32 as a magnetic field generallyperpendicular to a major surface of the magnetic field sensing element32. Thus, this arrangement is also generally suitable for most types ofHall effect elements.

It will be understood that the self-test magnetic field 60 b is largerthan the self-test magnetic field 60 a of FIG. 2 when the self-testcurrent is the same.

The self-test magnetic field 60 b can be a pulsed magnetic fieldgenerated by a pulsed current carried by the self-test current conductor30″. The self-test magnetic field 60 b physically adds to any othermagnetic field (not shown), e.g., the measured magnetic field,experienced by the magnetic field sensing element 32.

Referring now to FIG. 2B, in which like elements of FIGS. 1, 2 and 2Aare shown having like reference designations, a self-test currentconductor 30′″ is proximate to the magnetic field sensing element 32.The self-test current conductor 30′″ forms a multi-turn loop or coilaround the magnetic field sensing element 32. When a current in thedirection of the arrows on the conductor 30′″ passes through theself-test current conductor 30′″, a self-test magnetic field 60 c isgenerated and is received by the magnetic field sensing element 32 as amagnetic field generally perpendicular to a major surface of themagnetic field sensing element 32. Thus, this arrangement is alsogenerally suitable for most types of Hall effect elements.

It will be understood that the self-test magnetic field 60 c is largerthan the self-test magnetic field 60 a of FIG. 2 and the self-testmagnetic field 60 b of FIG. 2A when the self-test current is the same.

The self-test magnetic field 60 c can be a pulsed magnetic fieldgenerated by a pulsed current carried by the self-test current conductor30′″. The self-test magnetic field 60 c physically adds to any othermagnetic field (not shown), e.g., the measured magnetic field,experienced by the magnetic field sensing element 32.

Referring now to FIG. 2C, in which like elements of FIGS. 1, 2, 2A, and2B are shown having like reference designations, a self-test currentconductor 30″″ is proximate to the magnetic field sensing element 32.When a current in the direction of the arrow on the conductor 30″″passes through the self-test current conductor 30″″, a self-testmagnetic field 60 d is generated and is received by the magnetic fieldsensing element 32 as a magnetic field generally parallel to a majorsurface of the magnetic field sensing element 32. Thus, this arrangementis generally suitable for most types of magnetoresistance elements.

The self-test magnetic field 60 d can be a pulsed magnetic fieldgenerated by a pulsed current carried by the self-test current conductor30″″. The self-test magnetic field 60 d physically adds to any othermagnetic field (not shown), e.g., the measured magnetic field,experienced by the magnetic field sensing element 32.

Referring now to FIG. 2D, in which like elements of FIGS. 1, 2, 2A, 2B,and 2C are shown having like reference designations, a self-test currentconductor 30″″″ is proximate to the magnetic field sensing element 32.The magnetic field sensing element 32 is comprised of four magneticfield sensing elements 32 a-32 d. When a current in the direction of thearrow on the conductor 30″″″ passes through the self-test currentconductor 30″″′, a self-test magnetic field 60 e is generated and isreceived by the magnetic field sensing elements 32 a-32 d as a magneticfield generally parallel to major surfaces of the magnetic field sensingelements 32 a-32 d. Thus, this arrangement is generally suitable formost types of magnetoresistance elements.

The self-test magnetic field 60 e can be a pulsed magnetic fieldgenerated by a pulsed current carried by the self-test current conductor30″″′. The self-test magnetic field 60 e physically adds to any othermagnetic field (not shown), e.g., the measured magnetic field,experienced by the magnetic field sensing elements 32 a-32 d. In somearrangements, node 62 a can be coupled to a power supply voltage, forexample, Vcc, node 62 d can be coupled to a voltage reference, forexample, ground, and nodes 62 b, 62 c can provide a differential outputsignal.

Referring now to FIG. 3, a cross section of a portion of a magneticfield sensor 70 is representative of the magnetic field sensing element32 and self-test current conductor 30′″ of FIG. 2B. The magnetic fieldsensor 70 includes a magnetic field sensing element 92 supported by asubstrate 82 having a surface 82 a. The magnetic field sensing element92 may be impregnated into or diffused into and below the surface 82 aof the substrate 82, such as is known for manufacturing of Hall effectelements. The magnetic field sensing element 92 can have a maximumresponse axis 96 generally perpendicular to the surface 82 a of thesubstrate 82.

The magnetic field sensor 70 can include metal layers 84, 86, 88separated by insulating layers 76, 78, 80. Other metal and insulatinglayers (not shown) can be disposed between the conductive layer 76 andthe metal layer 84. An electromagnetic shield 72 can be disposed overanother insulating layer 74.

Sections 94 a-94 c are representative of a coil self-test conductor,such as the self-test conductor 30′″ of FIG. 2B and representative ofthe self-test conductor 30 of FIG. 1. The sections 94 a-94 c can formone continuous self-test conductor, here disposed on different ones ofthe metal layers 84, 86, 88 and coupled by way of vias 90 a, 90 b. Aself-test current carried by the self-test conductor 94 a-94 c tends toform a self-test magnetic field along the maximum response axis 96.

Referring now to FIG. 3A, in which like elements of FIG. 3 are shownhaving like reference designations, a magnetic field sensor 100 caninclude all of the layers of the magnetic field sensor 70 of FIG. 3 andalso the magnetic field sensing element 92 of FIG. 3, but the self-testconductor 94 a-94 c of FIG. 3 can be replaced by a continuous externalcoil self-test conductor 102, which, in some embodiments, can bedisposed upon a circuit board 104. The external self-test conductor 102is representative of the external self-test conductor 18 of FIG. 1. Theself-test conductor 102, shown on one metal layer of the circuit board104, can instead be formed from a plurality of metal layers upon thecircuit board 104. A self-test current carried by the self-testconductor 102 tends to form a self-test magnetic field along the maximumresponse axis 96.

Referring now to FIG. 3B, in which like elements of FIGS. 3 and 3A areshown having like reference designations, a magnetic field sensor 110can include all of the layers of the magnetic field sensors 70 of FIGS.3 and 100 of FIG. 3A, but the external self-test conductor 102 of FIG.3A can be replaced by a continuous external coil self-test conductor114. Furthermore, the magnetic field sensing element 92 of FIGS. 3 and3A can be replaced by a magnetic field sensing element 112 having amaximum response axis 116 generally parallel to the surface 82 a of thesubstrate 82. The external self-test conductor 114 is representative ofthe external self-test conductor 18 of FIG. 1.

The magnetic field sensing element 112 may be disposed on or near thesurface 82 a of the substrate 82, such as is known for manufacturing ofmagnetoresistance elements. The magnetic field sensing element 92 canhave a maximum response axis 116 generally parallel to the surface 82 aof the substrate 82. A self-test current carried by the self-testconductor 114 tends to form a self-test magnetic field along the maximumresponse axis 116.

Referring now to FIG. 3C, in which like elements of FIGS. 3-3B are shownhaving like reference designations, a magnetic field sensor 120 caninclude all of the layers of the magnetic field sensors 70, 100 and 110of FIGS. 3, 3A, and 3B, respectively, and also the magnetic fieldsensing element 112 of FIG. 3B, but the external self-test conductor 114of FIG. 3B can be replaced by an internal single conductor self-testconductor 122. The self-test conductor 122 is representative of theself-test conductor 30 of FIG. 1 and the self-test conductor 30″″ ofFIG. 2C.

A self-test current carried by the self-test conductor 122 tends to forma self-test magnetic field along the maximum response axis 116.

Referring now to FIG. 3D, in which like elements of FIGS. 3-3C are shownhaving like reference designations, a magnetic field sensor 130 caninclude all of the layers of the magnetic field sensors 70, 100, 110,and 120 of FIGS. 3, 3A, 3B, and 3C, respectively, but the internalself-test conductor 122 of FIG. 3C can be replaced by an external singleconductor self-test conductor 132, which, in some embodiments, can bedisposed upon a circuit board 134. The self-test conductor 132 isrepresentative of the external self-test conductor 18 of FIG. 1.

A self-test current carried by the self-test conductor 132 tends to forma self-test magnetic field along the maximum response axis 116.

While FIGS. 3-3D show various alternative embodiments associated withthe magnetic field sensing element 32 and self-test current conductors30, 18 or FIG. 1, it will be recognized that there are many otherpossible configurations, including, but not limited to, combinations ofthe configurations shown.

While FIGS. 3-3D are representative of portions of magnetic fieldsensors 70, 100, 110, 120, 130, it should be understood that themagnetic field sensing element 32 and self-test current conductor 30 ofFIG. 1 can be disposed on the same substrate as other portions of themagnetic field sensor 10 of FIG. 1, or, in other embodiments on a seconddifferent substrate from the other portions of the magnetic field sensor10 of FIG. 1.

Referring now to FIG. 3E, a magnetic field sensor 144, here encased in apackage 142, can be the same as or similar to the magnetic field sensor10 of FIG. 1. The magnetic field sensor 144 can be coupled to a leadframe having leads 146. The leads 146 can be electrically coupled to acircuit board 150. The magnetic field sensor 144 can be responsive to amagnetic field 148 perpendicular to a major surface of the magneticfield sensor 144, such as may be generated by proximity of a magneticfield source 140, for example, a hard ferromagnetic object.

Referring now to FIG. 3F, a magnetic field sensor 156, here encased in apackage 154, can be the same as or similar to the magnetic field sensor10 of FIG. 1. The magnetic field sensor 156 can be coupled to a leadframe having leads, of which leads 160 a, 160 b are representative. Theleads, e.g., 160 a, 160 b, can be electrically coupled to a circuitboard 150. The magnetic field sensor 156 can be responsive to a magneticfield 164 parallel to a major surface of the magnetic field sensor 156,such as may be generated by proximity of a magnetic field source 152,for example, a hard ferromagnetic object.

Also shown, in some alternate embodiments, the leads can be coupled witha measured conductor 158, which can be formed as a part of the leadframe of which the leads 160 a, 160 b are another part. A measuredcurrent carried by the measured conductor 158 tends to form a magneticfield 162 going into or out of the page, depending upon a direction ofthe current carried by the measured conductor 158. For thesearrangements, the magnetic field sensor 156 can be a current sensor andthe magnetic field sensor 156 can instead be responsive to the magneticfield 162 perpendicular to the major surface of the magnetic fieldsensor 156 (i.e., to the current) rather than to the magnetic field 164.

Referring now to FIG. 3G, a magnetic field sensor 170, here encased in apackage 168, can be the same as or similar to the magnetic field sensor10 of FIG. 1. The magnetic field sensor 170 can be coupled to a leadframe having leads, of which a lead 174 is representative. The leads,e.g., 174, can be electrically coupled to a circuit board 176. Themagnetic field sensor 170 can be responsive to a magnetic fieldgenerated by proximity of a magnetic field source 172 within the package168. For example, the magnetic field source 172 can be a measuredcurrent conductor similar to the measured current conductor 158 of FIG.3F.

Referring now to FIG. 4, a diagnostic request processor 190 can be thesame as or similar to the diagnostic request processor 58 of FIG. 1. Thediagnostic request processor 190 can be coupled to receive a diagnosticinput signal 192, which can be the same as or similar to the diagnosticinput signal 23 of FIG. 1. The diagnostic request processor 190 caninclude a diagnostic input decoder 204 to receive and to decode thediagnostic input signal 192. The diagnostic input decoder 204 cangenerate a decoded diagnostic signal 204 a.

The diagnostic request processor 190 can also include a pulse generator198 coupled to receive the decoded diagnostic signal 204 a andconfigured to generate a diagnostic control signal 198 a having pulsesin response to the decoded diagnostic signal 204 a. The diagnosticcontrol signal 198 a can be the same as or similar to the diagnosticcontrol signal 58 a of FIG. 1.

The diagnostic request processor 190 can also include a clock generator194 configured to generate a periodic clock signal 194 a. The diagnosticrequest processor 190 can also include an internal diagnostic clockgenerator 196 coupled to receive the clock signal 194 a and configuredto generate a periodic diagnostic clock signal 196 a.

The pulse generator 198 can be coupled to receive the diagnostic clocksignal 196 a and can be configured to generate the diagnostic controlsignal 198 a having pulses synchronized with the diagnostic clock signal196 a.

Thus, there can be at least two ways to control the pulse generator 198and associated diagnostics events, i.e., pulses within the diagnosticinput signal 198 a. As described above, the pulse generator 198 can beresponsive to the diagnostic input signal 192. Alternatively, the pulsegenerator 198 can be responsive to the control signal 196 a instead of,or in addition to, the diagnostic input signal 192. When responsive tothe control signal 196 a, the pulse generator 198 can generate pulses atperiodic time intervals, or groups of pulses at periodic time intervals.

The diagnostic request processor 190 can also include a power on circuit202 coupled to generate power on signal 202 a having a first state for apredetermined period of time after the magnetic field sensor, e.g., themagnetic field sensor 10 of FIG. 1, is first powered on, followed by asecond different state. The pulse generator 196 can be coupled toreceive the power on signal 202 a and can be further responsive to thepower on signal 202 a such that the pulse generator 198 also generatespulses in the diagnostic control signal 198 a in response to the poweron signal 202 a.

In some embodiments, the diagnostic clock signal 196 a has a frequencyin the range of about ten Hz to one hundred Hz. However, the diagnosticclock signal 196 a can also have a frequency higher than one hundred Hz(e.g., one thousand Hz) or lower than ten Hz (e.g., one Hz) or anywherein between ten Hz and one hundred Hz.

In some embodiments, the pulse generator 198 generates pulses having aperiod between about one μs and ten μs in the diagnostic control signal198 a. However, the pulse generator 198 can also generate pulses havinga period greater than ten μs (e.g., one hundred μs) or less than one μs(e.g., 0.1 μs) or anywhere in between one μs and ten μs.

The diagnostic control signal 198 a can be received by a coil drivercircuit 200, for example, a current source, which can be the same as orsimilar to the coil driver circuit 24 of FIG. 1. The coil driver circuit200 can generate a self-test current signal 200 a, which is received bya self-test current conductor the same as or similar to the self-testcurrent conductor 30 of FIG. 1 or the external coil 18 of FIG. 1.

Referring now to FIG. 5, a magnetic field sensor 210 can be the same asor similar to the magnetic field sensor 10 of FIG. 1. The magnetic fieldsensor 210 can include a current source 216 coupled to receive a supplyvoltage signal 212 and configured to generate a self-test current signal218. The current source 216 can be the same as or similar to the coildriver 24 of FIG. 1.

The magnetic field sensor 210 can also include a self-test currentconductor 224 coupled to receive and carry the self-test current signal218. While the self-test current conductor 224 is shown to be a coil,from FIGS. 2-2D, it will be understood that the self-test currentconductor 224 can have one of a variety of arrangements.

The magnetic field sensor 210 can also include a magnetic field sensingelement 226 proximate to the self-test current conductor 224 such thatthe magnetic field sensing element 226 can receive a self-test magneticfield generated by the current 218 carried by the self-test currentconductor 224. The magnetic field sensing element 226 can also receive ameasured magnetic field associated with a magnetic field generator (notshown) that the magnetic field sensor 210 is intended to measure. Thus,the magnetic field sensor is configured to generate a differentialcomposite magnetic field signal 226 a, 226 b comprising ameasured-magnetic-field-responsive signal portion and aself-test-responsive signal portion.

The magnetic field sensor 210 can also include an amplifier 228 coupledto receive the composite magnetic field signal 226 a, 226 b andconfigured to generate an amplified signal 228 a representative of thecomposite magnetic field signal 226 a, 226 b.

The magnetic field sensor 210 can also include a low pass filter 230 anda high pass filter 248, each coupled to receive the amplified signal 228a. The low pass filter 230 is configured to generate a filtered signal230 a and the high pass filter 248 is configured to generate a filteredsignal 248 a.

A comparator 240 can be coupled to receive the filtered signal 230 a.The comparator 240 can have hysteresis or other circuit techniques toresult in two thresholds 242, a magnetic field operate point (BOP) and amagnetic field release point (BRP). The BOP and BRP thresholds 242, insome embodiments, can be separated by a voltage equivalent to about fiveGauss received by the magnetic field sensing element 226. In otherembodiments, the BOP and BRP thresholds 242 can be separated by avoltage equivalent to about fifty Gauss received by the magnetic fieldsensing element 226. However, the BOP and BRP thresholds 242 can beseparated by a voltage equivalent to a magnetic field anywhere betweenabout five and fifty Gauss. The BOP and BRP thresholds 242 can also beseparated by a voltage equivalent to a magnetic field smaller than fiveGauss or larger than fifty Gauss. The comparator 240 is configured togenerate a two state comparison signal 240 a.

A comparator 250 can be coupled to receive the filtered signal 248 a.The comparator 250 can have hysteresis or other circuit techniques toresult in two thresholds, which can be relatively closely spaced about adiagnostic threshold voltage (TH_Diag) 252. In some embodiments, thehysteresis associated with the diagnostic threshold voltage 252 is aboutfifty millivolts. The comparator 250 is configured to generate a twostate comparison signal 250 a.

The magnetic field sensor 210 can also include a sensor outputformatting circuit (SOFC) 244 coupled to receive the comparison signal240 a and configured to generate a sensor non-linear output signal 244a. The SOFC 244 can be the same as or similar to the sensor outputformatting circuit 52 of FIG. 1.

The magnetic field sensor 210 can also include a diagnostic outputformatting circuit (DOFC) 254 coupled to receive the comparison signal250 a and configured to generate a diagnostic output signal 254 a. TheDOFC 254 can be the same as or similar to the diagnostic outputformatting circuit 56 of FIG. 1.

The magnetic field sensor 210 can also include a combining circuit 256coupled to receive the sensor non-linear output signal 244 a, coupled toreceive the diagnostic output signal 254 a, and configured to generate acombined output signal 256 a. The combining circuit 256 can be the sameas or similar to the combining circuit 54 of FIG. 1.

The magnetic field sensor 210 can also include another SOFC 246 coupledto receive the filtered signal 230 a and configured to generate a sensorlinear output signal 246 a. The SOFC 246 can be the same as or similarto the sensor output formatting circuit 52 of FIG. 1.

The magnetic field sensor 210 can also include a diagnostic requestprocessor 260 coupled to receive a diagnostic input signal 258 andconfigured to generate a diagnostic control signal 260 a. The diagnosticrequest processor 260 can be the same as or similar to the diagnosticrequest processor 58 or FIG. 1 or the diagnostic request processor 190of FIG. 4. Operation of the diagnostic request processor 260 can be asis described above in conjunction with FIG. 4 and is further describedbelow in conjunction with FIGS. 7-7F.

In operation, upon activation of the diagnostic control signal 260 a,the current source 216 can generate one or more current pulses 218,which are carried by the self-test conductor 224 resulting in aself-test magnetic field received by the magnetic field sensing element226. It will be understood that the self-test magnetic field, andtherefore, the self-test-responsive signal portion of the compositemagnetic field signal 226 a, 226 b, can have a frequency content that isgenerally above a frequency content of a measured magnetic field thatthe magnetic field sensor 210 is intended to measure. Therefore, thefiltered signal 248 a can be comprised predominantly of theself-test-responsive signal portion, i.e., pulses, and the filteredsignal 230 a can be comprised predominantly of themeasured-magnetic-field-responsive signal portion. Therefore, by way ofthe filters 230, 248, the composite magnetic field signal 226 a, 226 bis split into its two components, the self-test-responsive signalportion and the measured-magnetic-field-responsive signal portion.

In one particular embodiment, the low pass filter 230 has a breakfrequency of about two hundred kHz and the high pass filter 248 has abreak frequency above about two hundred kHz, such that the signal 248 atends to represent the self-test-responsive signal portion of thecomposite magnetic field signal 226 a, 226 b. Accordingly, in someembodiments, the measured magnetic field can have a frequency belowabout two hundred kHz.

It will be understood that the comparator 250 and the diagnosticthreshold 252 can assure that the pulses in the filtered signal 248 aare of proper and sufficient magnitude to be indicative of properoperation of the magnetic field sensing element 226, amplifier 228, andfilter 248. In operation, the comparator 250 generates the two-statecomparison signal 250 a, i.e., pulses, only when the pulses in thefiltered signal 248 a are proper. Pulses of the comparison signal 250 acan be reformatted into any format by the DOFC 254 to generate thediagnostic output signal 254 a. Exemplary formats of the diagnosticoutput signal 254 a are described below in conjunction with FIGS. 8A-8D.

As described above, the filtered signal 230 a is predominantly comprisedof the measured-magnetic-field-responsive signal portion. The SOFC 246can reformat the filtered signal 230 a into any format to generate thesensor linear output signal 246 a. In one particular embodiment, theSOFC 246 merely passes the filtered signal 230 a through the SOFC 246,in which case no reformatting occurs.

The comparison signal 240 a can be indicative of the magnetic fieldsensor 210 that operates as a magnetic switch. For example, when themagnetic field sensing element 226 is close to a measured magneticobject, resulting in a magnetic field at the magnetic field sensingelement 226 greater than an operating point, the comparison signal 240 ahas a first state, and when the magnetic field sensing element 226 isnot close to the measured magnetic object, resulting in a magnetic fieldat the magnetic field sensing element 226 less than a release point, thecomparison signal 240 a has a second different state. The SOFC 244 canreformat the comparison signal 240 a into any format to generate thesensor non-linear output 244 a. In one particular embodiment, the SOFC244 merely passes the comparison signal 240 a through the SOFC 244, inwhich case no reformatting occurs.

While many of the blocks of the magnetic field sensor 210 are shown tobe analog blocks, it should be appreciated that similar functions can beperformed digitally.

Referring now to FIG. 5A, in which like elements of FIG. 5 are shownhaving like reference designations, a magnetic field sensor 300 includesall of the components of the magnetic field sensor 210 of FIG. 5. Inaddition, the magnetic field sensor 300 includes an inverter 302configured to generate an inverted diagnostic control signal 302 a. Themagnetic field sensor 300 also includes an AND gate 304 coupled toreceive the comparison signal 250 a, coupled to receive the diagnosticcontrol signal 260 a, and configured to generate a diagnostic comparisonsignal 304 a. The magnetic field sensor 300 also includes a switch 222,which can be a FET, coupled across the self-test current conductor 224and controlled by the inverted diagnostic control signal 302 a. Themagnetic field sensor 300 also includes a logic circuit 306 configuredto generate a sensor non-linear threshold (TH_SONL) 314 received by theamplifier 240 in place of the BOP/BRP threshold 242 of FIG. 5. Each ofthese added elements improves operation of the magnetic field sensor 210of FIG. 5 in ways further described below.

The logic circuit 306 can include an AND gate 308 coupled to receive thediagnostic comparison signal 304 a, coupled to receive the non-linearsensor comparison signal 240 a, and configured to generate a logicsignal 308 a. The logic signal 308 a can be received at a set node of aset/reset flip-flop 310. The set/reset flip-flop 310 can also be coupledto receive the inverted diagnostic control signal 302 a at a reset node.The set/reset flip-flop 310 can be configured to generate a controlsignal 310 a received by a p-channel FET 312 acting as a switch to apower supply, Vcc.

The logic circuit 306 can include an inverter 316 coupled to receive thenon-linear sensor comparison signal 240 a′ and configured to generate aninverted signal 316 a. The logic circuit 306 can also include anotherAND gate 318 coupled to receive the diagnostic comparison signal 304 a,coupled to receive the inverted signal 316 a, and configured to generatea logic signal 318 a. The logic signal 318 a can be received at a setnode of another set/reset flip-flop 320. The set/reset flip-flop 320 canalso be coupled to receive the inverted diagnostic control signal 302 aat a reset node. The set/reset flip-flop 320 can be configured togenerate a control signal 320 a received by an n-channel FET 322 actingas a switch to ground. A source of the FET 312 can be coupled to a drainof the FET 322, forming a junction node. The BOP/BRP thresholds can alsobe received at the junction node. At the junction node, the sensoroutput non-linear threshold signal 314 is generated.

With this arrangement, it should be understood that at some times, thesensor output non-linear threshold 314 is equal to BOP, at other timesit is equal to BRP, at other times it is equal to Vcc, and at othertimes it is equal to ground.

Referring briefly to FIG. 5, it should be understood that the self-testcurrent 218 and resulting self-test-responsive signal portion of thecomposite magnetic field signal 226 a, 226 b does not pass through thecomparator 240 or the SOFC 244. Thus, the comparator 240 and SOFC 244are essentially excluded from the self-test.

Referring again to FIG. 5A, the logic circuit 306 provides that thecomparator 240 and SOFC are included in the self-test in the followingway. Whenever a diagnostic pulse occurs in the self-test current signal218, the non-linear sensor output threshold 314 is pulled either to Vccor to ground. At other times, the non-linear sensor output threshold 314behaves as in FIG. 5, wherein the non-linear sensor output threshold 314is either at a BOP or BRP voltage value. Thus, the sensor non-linearoutput signal 244 a′ (where the prime symbol is representative of adifference from the signal 244 a of FIG. 5) makes state transitions notonly responsive to a measured magnetic object near to or far from themagnetic field sensing element 226, but also makes transitions whenself-test pulses occur. It should be recognized that the same result maynot be achieved by merely removing the filter 230, for example, in thecase where the measured magnetic field is much greater than theself-test magnetic field, wherein the comparator 240 would not switch inthe presence of the self-test-responsive signal portion. This functionis further described in conjunction with FIGS. 10-10B.

The addition of the AND gate 304 having an input node coupled to receivethe diagnostic control signal 260 a results in removal of a possibilitythat any extraneous spikes or noise pulses in the comparison signal 250a could pass though to the diagnostic output signal 254 a when noself-test current pulse 218 is ongoing. Such spikes could result fromexternal magnetic field noise or pulses experienced by the magneticfield sensor 300.

The switch 222 also provides improved function. The switch 222 is onlyopened when a self-test current pulse 218 is ongoing. The switch isclosed at other times. Thus, any external noise or magnetic fieldsexperienced by the magnetic field sensor 300 will not be picked up bythe self-test conductor at times when no self-test current pulses 218are occurring.

Basic operation of the current sensor 300 is described above inconjunction with FIG. 5. The sensor non-linear output signal 244 a′ isdescribed below in conjunction with FIG. 10B.

Referring now to FIG. 5B, in which like elements of FIGS. 1, 5, and 5Aare shown having like reference designations, output circuits 350 can beincluded as part of the magnetic field sensors 210, 300 of FIGS. 5 and5A or any other magnetic field sensors shown or described herein. Outputcircuits 350 can include resistors 352 a-352 c coupled to a powersupply, Vdd, and coupled to a respective drain of respective FETs 354a-354 c. FET 354 a can be coupled to receive the sensor non-linearoutput signal 244 a at a gate node and configured to generate aninverted sensor non-linear output signal 356. FET 354 b can be coupledto receive the diagnostic output signal 254 a at a gate node andconfigured to generate an inverted diagnostic output signal 358. FET 354c can be coupled to receive the combined output signal 256 a at a gatenode and configured to generate an inverted combined output signal 360.

In some embodiments, the FETs 354 a-354 c are within an integratedmagnetic field sensor, and the resistors 352 a-352 c and the powersupply, Vdd, are outside of the integrated magnetic field sensor.However, in other embodiments, both the FETs 354 a-354 c and theresistors 352 a-352 c are within the integrated current sensor. In stillother embodiments, other output circuit arrangements can be used, forexample, using bipolar transistors or using a push pull configuration.

Referring now to FIG. 6, in which like elements of FIGS. 1, 5, and 5Aare shown having like reference designations, a magnetic field sensor370 is similar to the magnetic field sensor 210 of FIG. 5, however, themagnetic field sensor 370 includes a transparent latch 372 coupledbetween the comparator 240 and the SOFC 244, coupled to receive thecomparison signal 240 a at an input port and configured to generate alatched signal 372 a at an output port, which is received by the SOFC244. The transparent latch 372 is also coupled to receive the inverteddiagnostic control signal 302 a at an enable port.

The magnetic field sensor 370 also includes a track-and-hold circuit 374coupled to receive the amplified signal 228 a and configured to generatea tracking signal 374 a. The track-and-hold circuit 374 is also coupledto receive the diagnostic control signal 260 a at a control node suchthat the track-and-hold circuit holds whenever a current pulse appearsin the self-test current signal 218 and tracks otherwise. The magneticfield sensor 370 also includes a differencing circuit 376 coupled toreceive the amplified signal 228 a, coupled to receive the trackingsignal 374 a, and configured to generate a difference signal 376 areceived by the comparator 250 in place of the filtered signal 248 a ofFIG. 5. The magnetic field sensor 370 also includes the AND gate 304 ofFIG. 5A coupled to receive a comparison signal 250 a′, similar to thecomparison signal 250 a of FIGS. 5 and 5A, where the prime symbol isrepresentative of a similar signal. The magnetic field sensor 370 canalso include an optional low pass filter 378 coupled to receive theamplified signal 228 a and configured to generate a filtered signal 378a, which can be the same as or similar to the filtered signal 230 a ofFIG. 5.

In operation, the transparent latch 372 is transparent only when theself-test current signal 218 does not contain a current pulse.Therefore, the latched signal 372 a, which is intended to berepresentative of only the measured-magnetic-field-responsive signalportion of the composite magnetic field signal 226 a, 226 b is lesslikely to contain spurious transitions due to the current pulses.

In operation, the tracking signal 374 a contains predominantly themeasured-magnetic-field-responsive signal portion of the amplifiedsignal 228 a, since the track-and-hold circuit holds during theself-test-responsive signal portion of the amplified signal 228 a. Thus,the tracking signal 374 a is similar to the filtered signal 378 a, whichis the same as or similar to the filtered signal 230 a of FIGS. 5 and5A. The SOFC 246′ can thus receive either the tracking signal 374 a orthe filtered signal 378 a to generate the sensor linear output signal246 a′.

General operation of the magnetic field sensor 370 is similar to thatdescribed above in conjunction with FIGS. 5 and 5A, and thus, is notdescribed further.

Referring to FIGS. 7-7F, graphs 400, 420, 430, 440, 450, 460, and 470have vertical axes with scales in arbitrary units of volts andhorizontal axes with scales in arbitrary units of time.

The graph 400 includes a sensor non-linear output signal 402 and asensor linear output signal 408, which can be the same as or similar tothe sensor non-linear output signal 244 a and the sensor linear outputsignal 246 a of FIG. 5, respectively. The sensor non-linear outputsignal 402 includes high states, for example, high states 404 a, 404 band low states, for example, a low state 406.

The sensor linear output signal 408 is shown here as a triangle signal,but can be any linear signal. The sensor linear output signal 408includes sections with positive slopes, for example, sections 410 a, 410b, and sections with negative slopes, for example, a section 412.

The graph 420 includes an exemplary diagnostic control signal 422, whichcan be the same as or similar to the diagnostic control signal 260 a ofFIGS. 5, 5A, and 6. The graph 420 can also be representative of adiagnostic output signal, which can be the same as or similar to thediagnostic output signal 254 a, 254 a′ of FIGS. 5, 5A, and 6 and thediagnostic control signal 198 a of FIG. 4. It should be understood thatthe graph 420 can also be representative of current pulses in theself-test current signal 218 of FIGS. 5, 5A, and 6.

The signal 422 can include pulses, of which a pulse 424 is but oneexample. While the signal 422 is shown to include five pulses, othersuch signals 422 can include more than five or fewer than five pulses.

The graph 430 includes an exemplary diagnostic input signal 432, whichcan be the same as or similar to the diagnostic input signal 258 ofFIGS. 5, 5A, and 6, the diagnostic input signal 23 of FIG. 1, and thediagnostic input signal 192 of FIG. 4. The exemplary diagnostic inputsignal 432 can include pulses, of which a pulse 434 is but one example.Each pulse of the diagnostic input signal 432 can result in onecorresponding pulse of the diagnostic control signal 422 and onecorresponding pulse of the diagnostic output signal 422.

While the signal 432 is shown to include five pulses, other such signals432 can include more than five or fewer than five pulses.

The graph 440 includes another exemplary diagnostic input signal 442,which can be the same as or similar to the diagnostic input signal 258of FIGS. 5, 5A, and 6, the diagnostic input signal 23 of FIG. 1, and thediagnostic input signal 192 of FIG. 4. The diagnostic input signal 442can have one pulse 444. Each pulse of the diagnostic input signal 442can result in a plurality of pulses of the diagnostic control signal 422and a corresponding plurality of pulses of the diagnostic output signal422.

The graph 450 includes yet another exemplary diagnostic input signal452, which can be the same as or similar to the diagnostic input signal258 of FIGS. 5, 5A, and 6, the diagnostic input signal 23 of FIG. 1, andthe diagnostic input signal 192 of FIG. 4. The diagnostic input signal452 can have a high state 454, a low state 456, and an edge 458. Thehigh state 454 of the diagnostic input signal 452 can result in aplurality of pulses of the diagnostic control signal 422 and acorresponding plurality of pulses of the diagnostic output signal 422.

The graph 460 includes yet another exemplary diagnostic input signal462, which can be the same as or similar to the diagnostic input signal258 of FIGS. 5, 5A, and 6, the diagnostic input signal 23 of FIG. 1, andthe diagnostic input signal 192 of FIG. 4. The diagnostic input signal462 can have pulses, e.g., a pulse 464, with a first duty cycle, andpulses, e.g., a pulse 466, with a second different duty cycle. Risingedges of the pulses 464 having the first duty cycle, and including anedge 466, can each result in one corresponding pulse of the diagnosticcontrol signal 422 and one corresponding pulse of the diagnostic outputsignal 422. The pulses 466 having the second different duty cycle resultin no pulse in the diagnostic control signal 422 or in the diagnosticoutput signal 422.

The graph 470, which has a time scale expanded from that of FIGS. 7-7Fincludes yet another exemplary diagnostic input signal 478, which can bethe same as or similar to the diagnostic input signal 258 of FIGS. 5,5A, and 6, the diagnostic input signal 23 of FIG. 1, and the diagnosticinput signal 192 of FIG. 4. The diagnostic input signal 478 can have adigital chip address 472, a digital register address 474, and digitalregister data 476. The diagnostic input signal 478 can result in aplurality of pulses of the diagnostic control signal 422 and acorresponding plurality of pulses of the diagnostic output signal 422.

The diagnostic input signal 478 can be in one of a variety of formats orprotocols, for example, a custom protocol or a conventional protocol,for example, I2C, SENT, BiSS, LIN, or CAN.

It should be understood that each one of the diagnostic input signals432, 442, 452, 462, and 478 can be decoded by the diagnostic inputdecoder 204 of FIG. 4 to result in the diagnostic output/diagnosticcontrol signal 422.

It should be recognized that FIGS. 7B-7F show only a few exemplary typesof diagnostic input signals that may be used. Many other types ofdiagnostic input signals can also be used.

Referring now to FIGS. 8-8D, graphs 480, 490, 500, 510, and 520 havevertical axes with scales in arbitrary units of volts and horizontalaxes with scales in arbitrary units of time.

The graph 480 includes an exemplary diagnostic input signal 482, whichcan be the same as or similar to the diagnostic input signal 258 ofFIGS. 5, 5A, and 6, the diagnostic input signal 23 of FIG. 1, thediagnostic input signal 192 of FIG. 4, and the diagnostic input signal432 of FIG. 7B. The exemplary diagnostic input signal 482 can includepulses, of which a pulse 484 is but one example.

The graph 490 includes an exemplary diagnostic control signal 492, whichcan be the same as or similar to the diagnostic control signal 260 a ofFIGS. 5, 5A, and 6, and the diagnostic control signal 422 of FIG. 7A.The graph 490 can also be representative of a diagnostic output signal,which can be the same as or similar to the diagnostic output signal 254a, 254 a′ of FIGS. 5, 5A, and 6, the diagnostic output signal 198 a ofFIG. 4, and the diagnostic output signal 422 of FIG. 7A. It should beunderstood that the graph 490 can also be representative of currentpulses in the self-test current signal 218 of FIGS. 5, 5A, and 6.

The signal 492 can include pulses, of which a pulse 494 is but oneexample. While the signal 492 is shown to include five pulses, othersuch signals 492 can include more than five or fewer than five pulses.

Each pulse of the diagnostic input signal 482 can result in onecorresponding pulse of the diagnostic control signal 492 and onecorresponding pulse of the diagnostic output signal 492. The pulses 494of the diagnostic output signal 492 are indicative of a self-test thatis passing.

While the signal 492 is shown to include five pulses, other such signals492 can include more than five or fewer than five pulses.

The graph 500 includes yet another exemplary diagnostic output signal502, which can be the same as or similar to the diagnostic output signal254 a, 254 a′ of FIGS. 5, 5A, and 6, and the diagnostic output signal422 of FIG. 7A. The diagnostic output signal 502 can have a high state504, a low state 506, and an edge 508. The high state 504 of thediagnostic output signal 502 can result from a plurality of pulses 494of the diagnostic control signal 492 or from any of the diagnostic inputsignals of FIGS. 7B-7F. The high state 504 of the diagnostic outputsignal 502 can be indicative of a self-test that is passing.

The graph 510 includes yet another exemplary diagnostic output signal512, which can be the same as or similar to the diagnostic output signal254 a, 254 a′ of FIGS. 5, 5A, and 6, and the diagnostic output signal422 of FIG. 7A. The diagnostic output signal 512 can have pulses, e.g.,a pulse 514, with a first duty cycle, and pulses, e.g., a pulse 516,with a second different duty cycle. The pulses 514 having the first dutycycle and an edge 518 can each result from one corresponding pulse ofthe diagnostic control signal 492 or from any of the diagnostic inputsignals of FIGS. 7B-7F. The pulses 514 having the first duty cycle canbe indicative of a self-test that is passing.

The graph 520, which has a time scale expanded from that of FIGS. 8-8Cincludes yet another exemplary diagnostic output signal 528, which canbe the same as or similar to the diagnostic output signal 254 a, 254 a′of FIGS. 5, 5A, and 6, and the diagnostic output signal 422 of FIG. 7A.The diagnostic output signal 528 can have a digital chip address 522, adigital register address 524, and digital register data 526. Thediagnostic output signal 522 can result from a plurality of pulses ofthe diagnostic control signal 492 or from any of the diagnostic inputsignals of FIGS. 7B-7F. Particular digital register data 526 can beindicative of a self-test that is passing.

The diagnostic output signal 528 can be in one of a variety of formatsor protocols, for example, a custom protocol or a conventional protocol,for example, I2C SENT, BiSS, LIN, or CAN.

It should be recognized that FIGS. 8A-8D show only a few exemplary typesof diagnostic output signals that may be generated. Many other types ofdiagnostic output signals can also be generated.

Referring now to FIGS. 9-9E, graphs 530, 550, 560, 570, 580, and 590have vertical axes with scales in arbitrary units of volts andhorizontal axes with scales in arbitrary units of time.

The graph 530, like the graph 400 of FIG. 7, includes a sensornon-linear output signal 532 and sensor linear output signal 538, whichcan be the same as or similar to the sensor non-linear output signal 244a and the sensor linear output signal 246 a of FIG. 5, respectively. Thesensor non-linear output signal 532 includes high states, for example,high states 534 a, 534 b, and low states, for example, a low state 536.

The sensor linear output signal 538 is shown here as a triangle signal,but can be any linear signal. The sensor linear output signal 538includes sections with positive slopes, for example, sections 540 a, 540b, and sections with negative slopes, for example, a section 542.

The graph 550, like the graph 430 of FIG. 7B and the graph 480 of FIG.8, includes an exemplary diagnostic input signal 552, which can be thesame as or similar to the diagnostic input signal 258 of FIGS. 5, 5A,and 6, the diagnostic input signal 23 of FIG. 1, and the diagnosticinput signal 192 of FIG. 4. The exemplary diagnostic input signal 552can include pulses, of which a pulse 554 is but one example.

The graph 560 includes an exemplary combined output signal 562, whichcan be the same as or similar to the combined output signal 256 a, 256a′ of FIGS. 5, 5A, and 6, and the combined output signal 54 a of FIG. 1.The combined output signal 562 can include pulse groups, e.g., pulsegroups 564, 566, combined with the sensor non-linear output signal 532of FIG. 9, here shown as a dark line. The pulse groups, e.g., pulsegroups 564, 566, can be indicative of a self-test that is passing.

The graph 570 includes another exemplary combined output signal 572,which can be the same as or similar to the combined output signal 256 a,256 a′ of FIGS. 5, 5A, and 6, and the combined output signal 54 a ofFIG. 1. The combined output signal 572 can include small pulses, e.g.,small pulses 574, 576, combined with the sensor non-linear output signal532 of FIG. 9, here shown as a dark line. The small pulses, e.g., thesmall pulses 574, 576, can be indicative of a self-test that is passing.

The graph 580 includes yet another exemplary combined output signal 582,which can be the same as or similar to the combined output signal 256 a,256 a′ of FIGS. 5, 5A, and 6, and the combined output signal 54 a ofFIG. 1. The combined output signal 582 can include pulses, e.g., pulses584, 586, combined with the sensor non-linear output signal 532 of FIG.9, here shown as a dark line. The pulses, e.g., the pulses 584, 586, canbe indicative of a self-test that is passing.

The graph 590 includes yet another exemplary combined output signal 592,which can be the same as or similar to the combined output signal 256 a,256 a′ of FIGS. 5, 5A, and 6, and the combined output signal 54 a ofFIG. 1. The combined output signal 592 can include small pulses, e.g.,pulses 594, 596, combined with the sensor linear output signal 538 ofFIG. 9, here shown as a dark line. The pulses, e.g., the pulses 594,596, can be indicative of a self-test that is passing. Digitally encodedversions of all of the above output signals are also possible.

Referring now to FIGS. 10-10B, graphs 600, 610, and 620 have verticalaxes with scales in arbitrary units of volts and horizontal axes withscales in arbitrary units of time.

The graph 600, like the graph 420 of FIG. 7A and the graph 490 of FIG.8A, includes an exemplary diagnostic control signal 602, which can bethe same as or similar to the diagnostic control signal 260 a of FIGS.5, 5A, and 6, and the diagnostic control signal 198 a of FIG. 4. Thegraph 600 can also be representative of a diagnostic output signal,which can be the same as or similar to the diagnostic output signal 254a, 254 a′ of FIGS. 5, 5A, and 6. It should be understood that the graph600 can also be representative of current pulses in the self-testcurrent signal 218 of FIGS. 5, 5A, and 6.

The signal 602 can include pulses, of which a pulse 604 is but oneexample. While the signal 602 is shown to include five pulses, othersuch signals 422 can include more than five or fewer than five pulses.

The graph 610 includes a sensor non-linear comparison signal 612, whichcan be the same as or similar to the sensor non-linear comparison signal240 a′ of FIG. 5A. The sensor non-linear comparison signal 612 includeshigh states, for example, high states 614 a, 614 b, and low states, forexample, a low state 616.

The graph 620 includes an exemplary sensor non-linear output signal 622,which can be the same as or similar to the sensor non-linear outputsignal 244 a′ of FIG. 5A. The sensor non-linear output signal 622 isrepresentative of the function of the logic circuit 306 of FIG. 5A. Thesensor non-linear output signal 622 can include pulses, e.g., pulses624, 626, combined with the sensor non-linear comparison signal 612 ofFIG. 10A, here shown as a dark line. The pulses, e.g., the pulses 624,626, can be indicative of a self-test that is passing, namely, aproperly functioning comparator 240 and SOFC 244 of FIG. 5A.

Referring now to FIG. 11, an exemplary electromagnetic shield 800 can bethe same as or similar to the electromagnetic shield 72 of FIG. 3. Theelectromagnetic shield 800 is placed generally over a magnetic fieldsensing element 816, which can be the same as or similar to the magneticfield sensing element 92 of FIG. 3. The electromagnetic shield 800includes a first portion 802 and a second portion 804 separated by aslit 806. The first portion 802 and the second portion 804 are coupledwith a conductive region 808. A bonding pad 810 allows theelectromagnetic shield 800 to be coupled to a DC voltage, for example,to a ground voltage.

The electromagnetic shield 800 can be formed from a metal layer duringmanufacture of a magnetic field sensor, for example, the magnetic fieldsensor 70 of FIG. 3. The metal layer can be comprised of a variety ofmaterials, for example, aluminum, copper, gold, titanium, tungsten,chromium, or nickel.

It should be understood that an electromagnetic shield is not the sameas a magnetic shield. An electromagnetic shield is intended to blockelectromagnetic fields. A magnetic shield is intended to block magneticfields.

In the presence of an AC magnetic field (e.g., a magnetic fieldsurrounding a current carrying conductor), it will be understood that ACeddy currents 812, 814 can be induced in the electromagnetic shield 800.The eddy currents 812, 814 form into closed loops as shown. The closedloop eddy currents 812, 814 tend to result in a smaller magnetic fieldin proximity to the electromagnetic shield 800 than the magnetic fieldthat induced the eddy currents 812, 814. Therefore, if theelectromagnetic shield 800 were placed near a magnetic field sensingelement, for example, the magnetic field sensing element 92 of FIG. 3,the magnetic field sensing element 92 experiences a smaller magneticfield than it would otherwise experience, resulting in a less sensitivemagnetic field sensor, which is generally undesirable. Furthermore, ifthe magnetic field associated with the eddy current is not uniform orsymmetrical about the magnetic field sensing element 92, the magneticfield sensing element 92 might also generate an undesirable offsetvoltage.

The slit 806 tends to reduce a size (i.e., a diameter or path length) ofthe closed loops in which the eddy currents 812, 814 travel. It will beunderstood that the reduced size of the closed loops in which the eddycurrents 812, 814 travel results in smaller eddy currents 812, 814 and asmaller local effect on the AC magnetic field that induced the eddycurrent. Therefore, the sensitivity of a magnetic field sensor on whichthe magnetic field sensing element 816 and the electromagnetic shield800 are used is less affected by the smaller eddy currents.

Furthermore, by placing the shield 800 in relation to the magnetic fieldsensing element 816 as shown, so that the slit 806 passes over themagnetic field sensing element 816, it will be understood that themagnetic field associated with any one of the eddy currents 812, 814tends to form magnetic fields passing through the magnetic field sensingelement 816 in two directions, canceling over at least a portion of thearea of the magnetic field sensing element 816.

Referring now to FIG. 12, another exemplary electromagnetic shield 850can be the same as or similar to the electromagnetic shield 72 of FIG.3. The electromagnetic shield 850 includes four portions 852-858separated by four slits 860-866. The four portions 852-858 are coupledwith a conductive region 876. A bonding pad 878, allows theelectromagnetic shield 850 to be coupled to a DC voltage, for example, aground voltage.

In the presence of a magnetic field, it will be understood that eddycurrents 868-874 can be induced in the electromagnetic shield 850. Dueto the four slits 860-866, it will be understood that a size (i.e., adiameter or a path length) of the closed loops eddy currents 866-874tends to be smaller than the size of the closed loop eddy currents 812,814 of FIG. 11. It will be understood that the reduced size of theclosed loops in which the eddy currents 868-874 travel results insmaller eddy currents 868-874 and a smaller local affect on the ACmagnetic field that induced the eddy current than that which resultsfrom the shield 800 of FIG. 11. Therefore, the sensitivity of a magneticfield sensor on which the magnetic field sensing element 880 and theelectromagnetic shield 850 are used is less affected by the smaller eddycurrents 868-874 than the sensitivity of a current sensor using theshield 800 of FIG. 11.

Furthermore, by placing the shield 850 in relation to the magnetic fieldsensing element 880 as shown, so that the slits 860-866 pass over themagnetic field sensing element 880, it will be understood that themagnetic field associated with any one of the eddy currents 868-874,tends to form magnetic fields passing through the magnetic field sensingelement 880 in two directions, canceling over at least a portion of thearea of the magnetic field sensing element 880.

Referring now to FIG. 13, another exemplary electromagnetic shield 900can be the same as or similar to the electromagnetic shield 72 of FIG.3. The electromagnetic shield 900 includes a shielding portion 902having interdigitated members, of which member 902 a is but one example.The interdigitated members are coupled though a conductor portion 904 toa bonding pad 906, which allows the electromagnetic shield 900 to becoupled to a DC voltage, for example, a ground voltage.

It will be recognized that the electromagnetic shield 900 is able tosupport eddy currents having a much smaller size (i.e., diameter of pathlength) than the electromagnetic shield 850 of FIG. 12 or theelectromagnetic shield 800 of FIG. 11. Therefore, the electromagneticshield 900 tends to have an even smaller negative affect on sensitivityof a magnetic field sensor than that described above.

Referring now to FIG. 14, an electromagnetic shield 950 can be the sameas or similar to the electromagnetic shield 72 of FIG. 3. Theelectromagnetic shield 950 includes a shielding portion 952 having aplurality of members, of which member 952 a is but one example. Themembers are coupled though a conductor portion 954 to a bonding pad 956,which allows the electromagnetic shield 950 to be coupled to a DCvoltage, for example, a ground voltage. Advantages of theelectromagnetic shield 950 will be apparent from discussion above.

While shields having features to reduce eddy currents are describedabove, the shield 72 of FIGS. 3, 3A, 3C, and 3D can also have nofeatures to reduce eddy currents.

Referring now to FIG. 15, an exemplary application of theabove-described magnetic field sensors includes five magnetic fieldsensors 1004 a-1004 f arranged in a line. A gear shift lever 1000, suchas that which may be found in an automobile, can move left or right inthe view shown to select a gear, which may, for example, be park (P),reverse (R), neutral (N), drive (D), second gear (2), or first gear (1).Each gear is associated with a respective one of the magnetic fieldsensors as shown.

The gearshift lever 1000 can have a magnet 1002 disposed on an endthereof nearest to the magnetic field sensors 1004 a-1004 f. Inoperation, a magnetic field sensor, e.g., the magnetic field sensor 1004d, senses when the gearshift lever 1000 is at a position of theparticular magnetic field sensor, e.g., 1004 d, and thus, senses theparticular gear associated with the position of the gear shift lever. Inthis way, the magnetic field sensors 1004 a-1004 f can providerespective signals to a computer processor or the like, which canelectronically/mechanically configure the automobile transmission intothe selected gear.

This particular arrangement is shown to point out a potential problemwith the arrangements of FIGS. 5, 5A, and 6. In particular, if themagnetic field generated by the magnet 1002 is in the same direction asthe magnetic field generated by the self-test conductor 224 of FIGS. 5,5A, and 6, then the magnetic field generated by the self-test conductor224 may be overwhelmed by the magnetic field generated by the magnet,resulting in no diagnostic output signal 254 a, 254 a′ (FIGS. 5, 5A, 6).

In some embodiments, this shortcoming can be overcome merely byselecting the magnetic field generated by the magnet 1002 to be in adirection opposite to the direction of the magnetic field generated bythe self-test conductor 224. However, in other embodiments, it may bedesirable to have a magnetic field sensor that can select and/or changea direction of the magnetic field generated by the self-test conductor224. An exemplary arrangement having this ability is shown in FIG. 16.

Referring now to FIG. 16, in which like elements of FIGS. 5, 5A, and 6are shown having like reference designations, a circuit includes theself-test conductor 224, but arranged in a different way than is shownin other figures. Though shown separately spaced in FIG. 16, it shouldbe understood that, like the embodiments of FIGS. 5, 5A, and 6, themagnetic field sensing element 226 can be proximate to the self-testconductor 224.

Two comparators 1010, 1012 can be coupled to receive the signal 228 afrom the amplifier 228. The comparator 1010 can also be coupled toreceive a comparison signal 1014 a representative of a signal from theamplifier 228 when the magnetic field sensing element experiences zeroGauss (or a background magnetic field, e.g., the earth's magnetic field)plus a delta. The comparator 1012 can also be coupled to receive acomparison signal 1014 b representative of a signal from the amplifier228 when the magnetic field sensing element experiences zero Gauss (or abackground magnetic field, e.g., the earth's magnetic field) minus adelta.

The comparator 1010 can generate a first comparison signal 1010 a, andthe comparator 1012 can generate a second comparison signal 1012 a.

A flip-flop (i.e., a latch) 1020 can be coupled to receive the first andsecond comparison signals 1010 a, 1012 a, respectively at set and resetinputs and can be configured to generate a first output signal 1020 aand a second output signal 1020 b.

A first logic gate, for example, an AND gate 1022, can be coupled toreceive the first output signal 1020 a, coupled to receive thediagnostic control signal 260 a (FIGS. 5, 5A, 6), and configured togenerate a control signal 1022 a (Control A).

A second logic gate, for example, an AND gate 1024, can be coupled toreceive the second output signal 1020 b, coupled to receive thediagnostic control signal 260 a, and configured to generate a controlsignal 1024 a (Control B).

The self-test conductor 224 can be arranged in the cross arm of anH-bridge surrounded by switches 1026 a, 1026 b, 1028 a, 1028 b. Theswitches 1026 a, 1026 b are controlled by the first control signal 1022a, and the switches 1028 a, 1028 b are controlled by the second controlsignal 1024 a.

Thus, in operation, when the current generator 216 generates the current218 in response to the diagnostic control signal 260 a, the current 218flows through the self-test conductor 224 in one of two directionsdetermined by the first and second control signals 1022 a, 1024 a.

The comparators 1010, 1012 and the flip flop 1020 operate essentially asa window comparator, so that when the magnetic field experienced by themagnetic field sensing element 226 is large in a first direction, thediagnostic current passing through the self-test conductor 224 generatesa magnetic field in an opposite second direction (when the diagnosticcontrol signal 260 a is also high). Conversely, when the magnetic fieldexperienced by the magnetic field sensing element 226 is large in thesecond direction, the diagnostic current passing through the self-testconductor 224 is in the opposite first direction (when the diagnosticcontrol signal 260 a is also high).

With this arrangement, even in the presence of a fairly large magneticfield in either direction, which tends to saturate the magnetic fieldsensing element 226, or electronics coupled to the magnetic fieldsensing element, for example, the amplifier 228, still the self-testsignal 218 can generate a magnetic field in the opposite direction,which can propagate to the diagnostic output signal 254, 254 a′ of FIGS.5, 5A, and 6.

It will be apparent that the circuit of FIG. 16 can be incorporated intothe circuits of preceding figures.

All references cited herein are hereby incorporated herein by referencein their entirety. Having described preferred embodiments of theinvention, it will now become apparent to one of ordinary skill in theart that other embodiments incorporating their concepts may be used. Itis felt therefore that these embodiments should not be limited todisclosed embodiments, but rather should be limited only by the spiritand scope of the appended claims.

What is claimed is:
 1. A magnetic field sensor comprising: a magneticfield sensing element supported by a substrate, wherein the magneticfield sensing element is configured to generate a self-test signalresponsive to a pulsing self-test magnetic field during one or moreself-test time periods; a self-test circuit supported by the substrate,the self-test circuit comprising: a self test current conductorproximate to the magnetic field sensing element, the self-test currentconductor for carrying a self-test current to generate the self-testmagnetic field; a processing circuit coupled to receive a signalrepresentative of the self-test signal; and a diagnostic requestprocessor configured to control the self-test current to be on or off inresponse to a diagnostic input signal received by the diagnostic requestprocessor or to be indicative of a self-test during one or more timeperiods in response to a control signal generated by the diagnosticrequest processor.
 2. The magnetic field sensor of claim 1, wherein thediagnostic request processor comprises a decoder coupled to receive thediagnostic input signal, configured to decode the diagnostic inputsignal, and configured to generate a diagnostic control signal tocontrol the self-test current.
 3. The magnetic field sensor of claim 1,wherein the diagnostic request processor comprises an internaldiagnostic clock generator configured to generate the diagnostic controlsignal to control the self-test current to comprise a group of currentpulses during the one or more time periods.
 4. The magnetic field sensorof claim 1, wherein the self-test circuit further comprises: a currentgenerator circuit having an output node at which self-test currentpulses are generated, wherein the self-test current conductor is coupledto receive the self-test current pulses resulting in the self-testmagnetic field having magnetic field pulses.
 5. The magnetic fieldsensor of claim 4, wherein the current generator is configured togenerate the self-test current pulses in response to the diagnosticcontrol signal.
 6. The magnetic field sensor of claim 4, wherein thediagnostic input signal comprises control pulses, each control pulseresulting in one self-test current pulse from the current generator. 7.The magnetic field sensor of claim 4, wherein the diagnostic inputsignal comprises control pulses, each control pulse resulting in aplurality of self-test current pulses from the current generator.
 8. Themagnetic field sensor of claim 4, wherein the diagnostic input signalcomprises a first state during which the current generator generatesself-test current pulses and a second state during which the currentgenerator does not generate self-test current pulses.
 9. The magneticfield sensor of claim 4, wherein the diagnostic input signal comprisesfirst control pulses with a first duty cycle during Which the currentgenerator generates self-test current pulses, and wherein the diagnosticinput signal comprises second control pulses with a second duty cycleduring which the current generator does not generate self-test currentpulses.
 10. The magnetic field sensor of claim 4 wherein the diagnosticinput signal comprises a binary digital word.
 11. The magnetic fieldsensor of claim 1, wherein the self-test current conductor comprises aconductor supported by the substrate and proximate to the magnetic fieldsensing element.
 12. The magnetic field sensor of claim 1, wherein theself-test current conductor comprises a conductor supported by thesubstrate and spanning more than one metal layer supported by thesubstrate.
 13. The magnetic field sensor of claim 1, further comprisingan electromagnetic shield proximate to the magnetic field sensor. 14.The magnetic field sensor of claim 13, wherein the electromagneticshield comprises at least one feature configured to reduce an eddycurrent in the electromagnetic shield when the shield is exposed to anAC magnetic field.
 15. The magnetic field sensor of claim 1, wherein themagnetic field sensing element comprises a Hall effect element, whereinthe magnetic field sensor further comprises a current or voltagegenerator coupled to the Hall effect element.
 16. The magnetic fieldsensor of claim 1, wherein the magnetic field sensing element comprisesa magnetoresistance element, wherein the magnetic field sensor furthercomprises a current generator coupled to the magnetoresistance element.17. The magnetic field sensor of claim 1, wherein the one or moreself-test time periods comprises a time period beginning with a power-onof the magnetic field sensor and terminating a predetermined timethereafter.
 18. A method of generating a self-test of a magnetic fieldsensor, comprising: generating, with a magnetic field sensing elementsupported. by a substrate, a self-test signal responsive to a pulsingself-test magnetic field during one or more self-test time periods;providing a self-test circuit supported by the substrate, the providingthe self-test circuit comprising: providing a self-test currentconductor proximate to the magnetic field sensing element, the self-testcurrent conductor for carrying a self-test current to generate theself-test magnetic field; providing a processing circuit coupled toreceive a signal representative of the self-test signal; and providing adiagnostic request processor configured to control the self-test currentto be on or off in response to a diagnostic input signal received by thediagnostic request processor or to be indicative of a self-test duringone or more time periods in response to a control signal generated bythe diagnostic request processor.
 19. The method of claim 18, furthercomprising: controlling, in response to an internal control signal, theself-test current to comprise a group of current pulses during the oneor more time periods.
 20. The method of claim 18, wherein the self-testcurrent conductor comprises a conductor supported by the substrate andproximate to the magnetic field sensing element.
 21. The method of claim18, wherein the self-test current conductor comprises a coil supportedby the substrate and spanning more than one metal layer supported by thesubstrate.
 22. The method of claim 21, further comprisingelectromagnetically shielding the magnetic field sensor.
 23. The methodof claim 18, further comprising electromagnetically shielding themagnetic field sensor.
 24. The method of claim 18, wherein the one ormore self-test time periods comprises a time period beginning with apower-on of the magnetic field sensor and terminating a predeterminedtime thereafter.